﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace EasyOAuth.Core.Web
{

    /// <summary>
    /// api 消息输出
    /// </summary>
    public class ApiErr
    {
        /// <summary>
        /// 错误消息
        /// </summary>
        /// <param name="message">错误消息</param>
        /// <param name="code">异常状态码</param>
        /// <returns></returns>
        public static ApiResException Message(string message = "", int code = -1)
        {
            return new ApiResException(message, code, new { });
        }

        /// <summary>
        /// 错误消息
        /// </summary>
        /// <param name="message"></param>
        /// <param name="code"></param>
        /// <returns></returns>
        public static ApiResException MessageArray(string message = "", int code = -1)
        {
            return new ApiResException(message, code, Array.Empty<string>());
        }
    }
}
